ui_print("Quectel FOTA Tools
  Version
     v4.1 : Full upgrade supports upgrading specified partitions
");
ui_print("Patching system files...");
assert(apply_patch_check("/tmp/multifota.bin", "bb35124580ba2467e1cf9a4763067183a9a3217a"));
set_progress(0.000000);
unmount("/system/firmware");
write_raw_image(package_extract_file("full-images/sdxnightjar-boot.img"), "boot");
check_partition_sha1("MTD:boot:8122368:797cf0c9834af8df1b9d8505362edf3c08df1ffc");
set_progress(0.105754);
unmount("/system");
write_raw_image(package_extract_file("full-images/sdxnightjar-sysfs.ubi"), "system");
check_partition_sha1("MTD:system:68681728:26a4a011d321d6cf3bf4b161ab8617453ab12f44");
set_progress(1.000000);
ui_print("Upgrade finished!!!");
